import App from './App'
import Vue from 'vue'
import './uni.promisify.adaptor'
import uView from '@/uni_modules/uview-ui'
import store from "@/store/index.js"

// 运行平台系统类型
var platform = require('utils/common.js')
Vue.prototype.$os = platform;

// 导入并挂载全局的分享方法
// import share from './utils/share.js'
// Vue.mixin(share)

Vue.config.productionTip = false
Vue.prototype.$store = store;

let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); //获取菜单按钮（右上角胶囊按钮）的布局位置信息。坐标信息以屏幕左上角为原点。
console.log(menuButtonInfo);
uni.getSystemInfo({
	//获取系统信息
	success: (res) => {
		console.log(res);
		Vue.prototype.navBarHeight = res.statusBarHeight + 44 + 'px';
		Vue.prototype.menuRight = res.screenWidth - menuButtonInfo.right + 'px';
		Vue.prototype.menuTop = menuButtonInfo.top + 'px';
		Vue.prototype.menuBotton = menuButtonInfo.top - res.statusBarHeight + 'px';
		Vue.prototype.menuHeight = menuButtonInfo.height + 'px';
		Vue.prototype.statusBarHeight = res.statusBarHeight + 'px';

		Vue.prototype.screenWidth = res.screenWidth;
		Vue.prototype.screenHeight = res.screenHeight;
		console.log("=========");
	},
	fail(err) {
		console.log(err);
	}
});
Vue.use(uView)

App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()